home *** CD-ROM | disk | FTP | other *** search
/ CyberMycha 2008 January / Cybermycha 1_2008.iso / Data.cab / _3099972179274A94913B9A5B7D6A60CD < prev    next >
Encoding:
Text File  |  2004-04-29  |  741 b   |  47 lines

  1.  
  2. regc(0, "COMBINED_XFORM")
  3. regc(4, "MODELVIEW_XFORM")
  4. regc(10, "FOG_PARAMS")
  5.  
  6. regc(20, "TEXTURE0_XFORM")
  7. regc(24, "TEXTURE1_XFORM")
  8. regc(28, "TEXTURE2_XFORM")
  9. regc(32, "TEXTURE3_XFORM")
  10. regc(36, "TEXTURE4_XFORM")
  11.  
  12. vshader("
  13.  
  14. #define point        v0
  15.  
  16. #include <fog.inc>
  17.  
  18.     vs_1_1
  19.  
  20.     dcl_position    point
  21.  
  22.     ; output position (must the calculated in the same way in all passes)
  23.     m4x4    r0, point, c0
  24.         mov    oPos, r0
  25.  
  26.     ; pos in camera space
  27.     m4x4    r0, point, c4
  28.  
  29.     ; output texcoords
  30.     m4x4    oT0, r0, c20
  31.     m4x4    oT1, r0, c24
  32.  
  33.     dp4    oT2.x, r0, c28
  34.     dp4    oT2.y, r0, c29
  35.  
  36.     dp4    oT3.x, r0, c32
  37.     dp4    oT3.y, r0, c33
  38.  
  39.     dp4    oT4.x, r0, c36
  40.     dp4    oT4.y, r0, c37
  41.  
  42.     ; calc fog
  43.        dp4    r0.x, point, c2
  44.         FOG(r0.x, c10, r10)
  45. ")
  46.  
  47.